package com.darren.euc.dao.impl;


import java.util.List;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.darren.euc.dao.ProductTypeDao;
import com.darren.euc.entity.ProductType;


@Repository
public class ProductTypeDaoImpl extends BaseDaoImpl<ProductType, Integer> implements ProductTypeDao {
	
	@SuppressWarnings("unchecked")
	@Override
	public List<ProductType> getAll() {
		Session session = sessionFactory.getCurrentSession();	
		return session.createSQLQuery("select * from euc_product_type where enable='1' order by display_sequence asc,convert(product_type_name using gbk) asc;").addEntity(ProductType.class).list();
	}


}